home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-01-05 | 1.6 KB | 45 lines | [TEXT/GEOL] |
- Item 8039134 5-Jan-90 13:11
-
- From: TERRAN Cyberex, Terran Van Wagner,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: IControl ignoring itsDocument
-
- I am having problems getting the fChangeCount to be incremented for
- my editText fields in a DialogView. I want to use default command
- objects for undoing, redoing the typing in these edit text fields.
- It seems that the fChangedDocument is NIL when TApplication.PerformCommand
- is executed. (The fCausesChange is set to TRUE.) I also see that
- the fDocument field is NIL for the TTEView that gets passed to the
- ICommand method. This stems from the fact that TDialogView.MakeTEView
- sends NIL as the document parameter when calling ITEView. Why is the
- document for the TTEView NIL? The only thing I can see to do is to
- override the MakeTEView method and set the document myself. Am I
- missing something, or is this the way to do it?
-
- Looking through TControl.IControl, I see that it always passes NIL
- for the document to it's IView call, breaking the connection
- to the document for all it's subclasses .(LOTS of CLASSES)
-
- Perhaps related, quoting from MacApp Source:
-
- TControl.IRes(itsDocument: TDocument; itsSuperView: TView; VAR itsParams: Ptr);
-
- VAR
- aTextStyle: TextStyle;
-
- BEGIN
- { Don't pass the document to INHERITED IRes. This avoids
- putting the control on the document's view list.}
- INHERITED IRes(NIL, itsSuperView, itsParams);
- fDocument := itsDocument;
- ...
- END;
-
- In our application we often need access to the document from a control
- are we doing something strange?
-
- Thanks, Terran
-
-